package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DbInformationMapper;
import com.ruoyi.system.domain.DbInformation;
import com.ruoyi.system.service.IDbInformationService;

/**
 * 咨询浏览Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-22
 */
@Service
public class DbInformationServiceImpl implements IDbInformationService 
{
    @Autowired
    private DbInformationMapper dbInformationMapper;

    /**
     * 查询咨询浏览
     * 
     * @param id 咨询浏览主键
     * @return 咨询浏览
     */
    @Override
    public DbInformation selectDbInformationById(Long id)
    {
        return dbInformationMapper.selectDbInformationById(id);
    }

    /**
     * 查询咨询浏览列表
     * 
     * @param dbInformation 咨询浏览
     * @return 咨询浏览
     */
    @Override
    public List<DbInformation> selectDbInformationList(DbInformation dbInformation)
    {
        return dbInformationMapper.selectDbInformationList(dbInformation);
    }

    /**
     * 新增咨询浏览
     * 
     * @param dbInformation 咨询浏览
     * @return 结果
     */
    @Override
    public int insertDbInformation(DbInformation dbInformation)
    {
        dbInformation.setCreateTime(DateUtils.getNowDate());
        return dbInformationMapper.insertDbInformation(dbInformation);
    }

    /**
     * 修改咨询浏览
     * 
     * @param dbInformation 咨询浏览
     * @return 结果
     */
    @Override
    public int updateDbInformation(DbInformation dbInformation)
    {
        dbInformation.setUpdateTime(DateUtils.getNowDate());
        return dbInformationMapper.updateDbInformation(dbInformation);
    }

    /**
     * 批量删除咨询浏览
     * 
     * @param ids 需要删除的咨询浏览主键
     * @return 结果
     */
    @Override
    public int deleteDbInformationByIds(Long[] ids)
    {
        return dbInformationMapper.deleteDbInformationByIds(ids);
    }

    /**
     * 删除咨询浏览信息
     * 
     * @param id 咨询浏览主键
     * @return 结果
     */
    @Override
    public int deleteDbInformationById(Long id)
    {
        return dbInformationMapper.deleteDbInformationById(id);
    }
}
